package com.ihg.hiex.admin.entity.dto;

/**
 * 
 * @author houtao
 *
 */
public class LeadAndDevelop {
    
    private String assessorEvalution;
    
    private String internalBenchmark;
    
    private String externalBenchmark;
    
    private int qxcsxx;
    
    private int zdtr;
    
    private int zstr;
    
    private int ljtr;
    
    private int sbrts;
    
    private int sftr;
    
    private int tdhz;
    
    private int potential;
    
    /**
     * 
     */
    public LeadAndDevelop() {
    }
    
    /**
     * 
     * @param qxcsxx
     * @param zdtr
     * @param zstr
     * @param ljtr
     * @param sbrts
     * @param sftr
     * @param tdhz
     */
    public LeadAndDevelop(int qxcsxx, int zdtr, int zstr, int ljtr, int sbrts, int sftr, int tdhz) {
        this.qxcsxx = qxcsxx;
        this.zdtr = zdtr;
        this.zstr = zstr;
        this.ljtr = ljtr;
        this.sbrts = sbrts;
        this.sftr = sftr;
        this.tdhz = tdhz;
        double po = (qxcsxx + ljtr + sftr + tdhz) * 0.1 
                + (zdtr + zstr + sbrts) * 0.2;
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(7.00)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.57)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.29)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.86)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.43)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.14)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.71)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.43)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.00)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
    }
    
    /**
     * 
     * @param assessorEvalution
     * @param internalBenchmark
     * @param externalBenchmark
     * @return
     */
    public LeadAndDevelop init(String assessorEvalution, String internalBenchmark, String externalBenchmark) {
        this.assessorEvalution = assessorEvalution;
        this.internalBenchmark = internalBenchmark;
        this.externalBenchmark = externalBenchmark;
        return this;
    }

    /**
     * 
     * @param qxcsxx
     * @param zdtr
     * @param zstr
     * @param ljtr
     * @param sbrts
     * @param sftr
     * @param tdhz
     * @return
     */
    public LeadAndDevelop init(int qxcsxx, int zdtr, int zstr, int ljtr, int sbrts, int sftr, int tdhz) {
        this.qxcsxx = qxcsxx;
        this.zdtr = zdtr;
        this.ljtr = ljtr;
        this.sbrts = sbrts;
        this.sftr = sftr;
        this.tdhz = tdhz;
        double po = (qxcsxx + ljtr + sftr + tdhz) * 0.1 
                + (zdtr + zstr + sbrts) * 0.2;
        
        //this.potential = new Double(po).intValue();
        
        if(po > new Double(7.00)) {
    		this.potential = new Integer(10);
    	} else if (po > new Double(6.57)) {
    		this.potential = new Integer(9);
    	} else if (po > new Double(6.29)) {
    		this.potential = new Integer(8);
    	} else if (po > new Double(5.86)) {
    		this.potential = new Integer(7);
    	} else if (po > new Double(5.43)) {
    		this.potential = new Integer(6);
    	} else if (po > new Double(5.14)) {
    		this.potential = new Integer(5);
    	} else if (po > new Double(4.71)) {
    		this.potential = new Integer(4);
    	} else if (po > new Double(4.43)) {
    		this.potential = new Integer(3);
    	} else if (po > new Double(4.00)) {
    		this.potential = new Integer(2);
    	} else {
    		this.potential = new Integer(1);
    	}
        
        return this;
    }

	public String getAssessorEvalution() {
		return assessorEvalution;
	}

	public void setAssessorEvalution(String assessorEvalution) {
		this.assessorEvalution = assessorEvalution;
	}

	public String getInternalBenchmark() {
		return internalBenchmark;
	}

	public void setInternalBenchmark(String internalBenchmark) {
		this.internalBenchmark = internalBenchmark;
	}

	public String getExternalBenchmark() {
		return externalBenchmark;
	}

	public void setExternalBenchmark(String externalBenchmark) {
		this.externalBenchmark = externalBenchmark;
	}

	public int getQxcsxx() {
		return qxcsxx;
	}

	public void setQxcsxx(int qxcsxx) {
		this.qxcsxx = qxcsxx;
	}

	public int getZdtr() {
		return zdtr;
	}

	public void setZdtr(int zdtr) {
		this.zdtr = zdtr;
	}

	public int getZstr() {
		return zstr;
	}

	public void setZstr(int zstr) {
		this.zstr = zstr;
	}

	public int getLjtr() {
		return ljtr;
	}

	public void setLjtr(int ljtr) {
		this.ljtr = ljtr;
	}

	public int getSbrts() {
		return sbrts;
	}

	public void setSbrts(int sbrts) {
		this.sbrts = sbrts;
	}

	public int getSftr() {
		return sftr;
	}

	public void setSftr(int sftr) {
		this.sftr = sftr;
	}

	public int getTdhz() {
		return tdhz;
	}

	public void setTdhz(int tdhz) {
		this.tdhz = tdhz;
	}

	public int getPotential() {
		return potential;
	}

	public void setPotential(int potential) {
		this.potential = potential;
	}
}
